package com.chengzhi.service;

import com.chengzhi.config.FeignSpringFormEncoder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author ruanchengzhi
 * @description: upload
 * @date 2019/9/26 9:37
 */
//@FeignClient(name = "service-two", configuration = FeignSpringFormEncoder.class)
public interface UploadServiceApi {

    @RequestMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String upload(@RequestPart(value = "file") MultipartFile file);

    @RequestMapping(value = "/batchUpload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String batchUpload(@RequestPart(value = "file")MultipartFile[] files);
}
